Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build with GCC 13 #35

Merged
merged 1 commit into from
Apr 13, 2023
Merged

Fix build with GCC 13 #35

merged 1 commit into from
Apr 13, 2023

Conversation

thesamesam
Copy link
Contributor

GCC 13 (as usual for new compiler releases) shuffles around some internal includes and so etc is no longer transitively included:

/var/tmp/portage/games-action/astromenace-1.4.2/work/astromenace-1.4.2/src/core/model3d/model3d.cpp: In member function ‘bool viewizard::cModel3DWrapper::LoadVW3D(const std::string&)’:
/var/tmp/portage/games-action/astromenace-1.4.2/work/astromenace-1.4.2/src/core/model3d/model3d.cpp:602:10: error: ‘uint32_t’ is not a member of ‘std’; did you mean ‘wint_t’?
  602 |     std::uint32_t ChunkArraySize;
      |          ^~~~~~~~
      |          wint_t
/var/tmp/portage/games-action/astromenace-1.4.2/work/astromenace-1.4.2/src/core/model3d/model3d.cpp:603:18: error: ‘ChunkArraySize’ was not declared in this scope
  603 |     File->fread(&ChunkArraySize, sizeof(ChunkArraySize), 1);
      |                  ^~~~~~~~~~~~~~
/var/tmp/portage/games-action/astromenace-1.4.2/work/astromenace-1.4.2/src/core/model3d/model3d.cpp: In member function ‘bool viewizard::cModel3DWrapper::SaveVW3D(const std::string&)’:
/var/tmp/portage/games-action/astromenace-1.4.2/work/astromenace-1.4.2/src/core/model3d/model3d.cpp:681:10: error: ‘uint32_t’ is not a member of ‘std’; did you mean ‘wint_t’?
  681 |     std::uint32_t ChunkArraySize = static_cast<std::uint32_t>(Chunks.size());
      |          ^~~~~~~~
      |          wint_t
/var/tmp/portage/games-action/astromenace-1.4.2/work/astromenace-1.4.2/src/core/model3d/model3d.cpp:682:45: error: ‘ChunkArraySize’ was not declared in this scope
  682 |     FileVW3D.write(reinterpret_cast<char*>(&ChunkArraySize), sizeof(ChunkArraySize));
      |                                             ^~~~~~~~~~~~~~

See https://gnu.org/software/gcc/gcc-13/porting_to.html.

Bug: https://bugs.gentoo.org/895760

GCC 13 (as usual for new compiler releases) shuffles around some internal includes and so etc is no longer transitively included:
```
/var/tmp/portage/games-action/astromenace-1.4.2/work/astromenace-1.4.2/src/core/model3d/model3d.cpp: In member function ‘bool viewizard::cModel3DWrapper::LoadVW3D(const std::string&)’:
/var/tmp/portage/games-action/astromenace-1.4.2/work/astromenace-1.4.2/src/core/model3d/model3d.cpp:602:10: error: ‘uint32_t’ is not a member of ‘std’; did you mean ‘wint_t’?
  602 |     std::uint32_t ChunkArraySize;
      |          ^~~~~~~~
      |          wint_t
/var/tmp/portage/games-action/astromenace-1.4.2/work/astromenace-1.4.2/src/core/model3d/model3d.cpp:603:18: error: ‘ChunkArraySize’ was not declared in this scope
  603 |     File->fread(&ChunkArraySize, sizeof(ChunkArraySize), 1);
      |                  ^~~~~~~~~~~~~~
/var/tmp/portage/games-action/astromenace-1.4.2/work/astromenace-1.4.2/src/core/model3d/model3d.cpp: In member function ‘bool viewizard::cModel3DWrapper::SaveVW3D(const std::string&)’:
/var/tmp/portage/games-action/astromenace-1.4.2/work/astromenace-1.4.2/src/core/model3d/model3d.cpp:681:10: error: ‘uint32_t’ is not a member of ‘std’; did you mean ‘wint_t’?
  681 |     std::uint32_t ChunkArraySize = static_cast<std::uint32_t>(Chunks.size());
      |          ^~~~~~~~
      |          wint_t
/var/tmp/portage/games-action/astromenace-1.4.2/work/astromenace-1.4.2/src/core/model3d/model3d.cpp:682:45: error: ‘ChunkArraySize’ was not declared in this scope
  682 |     FileVW3D.write(reinterpret_cast<char*>(&ChunkArraySize), sizeof(ChunkArraySize));
      |                                             ^~~~~~~~~~~~~~
```

See https://gnu.org/software/gcc/gcc-13/porting_to.html.

Bug: https://bugs.gentoo.org/895760
@viewizard viewizard merged commit d5e007c into viewizard:master Apr 13, 2023
@viewizard
Copy link
Owner

@thesamesam thank you!

@thesamesam
Copy link
Contributor Author

Thanks!

@thesamesam thesamesam deleted the gcc13 branch April 15, 2023 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants